#ifndef POP3INVOKER_H
#define POP3INVOKER_H

class QTcpSocket;
class QFile;
class POP3Invoker
{
public:
    POP3Invoker();
    ~POP3Invoker();
    bool Connect(QString serverAddress,unsigned short port = 110);
    bool Login(QString username, QString password);
    bool Statistics(quint64 &numberOfMails,quint64 &totalMailSize);
    bool Reset();
    bool NoOperation();
    bool TemporaryDelete(quint64 mailID);
    bool Retrieve(QFile *mail, quint64 mailID);
    bool Quit();
private:
    QTcpSocket *socket;
    bool execute(QString cmd,QString *output = NULL);
};

#endif // POP3INVOKER_H
